package com.xinxi11.module.core.web.freemarker.function;

import java.util.List;

import freemarker.template.TemplateMethodModel;
import freemarker.template.TemplateModelException;

/**
 * 逻辑与运算
 */
public class MathAndFunction implements TemplateMethodModel {

	@SuppressWarnings("rawtypes")
	@Override
	public Object exec(List args) throws TemplateModelException {
		Long result = 0x7fffffffffffffffL;
		for (Object obj : args) {
			result = result & Long.valueOf((String) obj);
		}
		return result > 0;
	}

}
